
This folder contains the data and scripts needed to replicate the results of the paper "Coronavirus Perceptions and Economic Anxiety". Analysis was conducted with a mix of Stata 15 and Python.


The "data" folder contains the data required to replicate the results in the paper. Below is a brief description of the different data sets even if they could not be included.

Google trends data

- Daily Google search data during the study period (GOOGLE.TRENDS.DAILY.dta).
- Data of Google searches at weekly level to show predictiveness of Google searches of recessions (WEEKLY.GOOGLE.dta). 
- Data of placebo Google searches during the study period (PLACEBOGOOGLETRENDS.DAILY.dta).

Survey data
	- Data of March 5th survey (survey1.dta).
	- Data of March 16th survey (survey2.dta).
	- March 16th survey containing mental model classification (finalcluster.csv).


COVID data
- Global COVID-19 cases at country-day level based on Dong et al. (2020) (COVID.DAILY.dta).
- Data on first human-to-human transmission in a state - coded manually based on WHO situation reports (first_hth_transmission_NOMISSING.dta).
- Date on COVID-19 cases at the US state level (COVID.STATES.DAILY.dta). 


Auxiliary data:
- Data on time series of Google searches are and COVID-19 cases are contained in the "timeseries" subsfolder.
- Data on national accounts at quarterly level (EIU_QUARTERLY2020.dta).
- Data on nationally representative polls for the US (Roperpoll_data.dta - not included but available as STATA file from Roper Centre https://ropercenter.cornell.edu/ipoll/study/31117209).
- Aggregate data from external polls comparing economic sentiment over time (in "data/external_data")



The "do-files" folder contains all scripts used to generate the results of the paper. 
- 01_masterdofile.do is the master do-file that runs all Stata code from the subdirectories (cleaning, table generation and generation of results for figures). The script output is save in the following log-file: economic_anxiety_logfile.smcl
- "ado" contains custom Stata scripts used in the analysis.
- "cleaning" contains the do-files used to clean the survey data.
- Tables contains do-files that create the tables presented in the paper.
- Figures contains the code that create the figures presented in the paper "Figures.ipynb". This is created using Python notebook and is not called in the master do-file).

The "output" folder contains the output generated by the scripts in the "do-files" folder.


References:

Dong, Ensheng, Hongru Du, and Lauren Gardner, “An Interactive Web-Based Dashboard to Track COVID-19 in Real Time,” The Lancet Infectious Diseases, 2020.